home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGNG_C / TCGRAPH.LZH / GLOB_DEF.H next >
Text File  |  1987-06-10  |  2KB  |  90 lines

  1. /*--------------------------------------------------------------------------
  2.  *                                glob_def.h
  3.  *
  4.  *                      copyright 1987 by Michael Allen
  5.  *
  6.  *       This contains the global includes and defines thay you will use
  7.  *       in all your program modules that used functions from graph.lib.
  8.  *          add: #include "glob_def.h" to all such files.
  9.  *
  10.  *-------------------------------------------------------------------------*/
  11.  
  12.  
  13. #define max(a,b)    (((a) > (b)) ? (a) : (b))
  14. #define min(a,b)    (((a) < (b)) ? (a) : (b))
  15. #define textmode() init_graphics(TEXTMODE)
  16. #define hires()    init_graphics(HIGHRES)
  17.  
  18.  
  19. #define false  0
  20. #define true   1
  21.  
  22. /* function key definitions */
  23.  
  24. #define UP    'H'
  25. #define DOWN  'P'
  26. #define LEFT  'K'
  27. #define RIGHT 'M'
  28. #define SPACE ' '
  29. #define ESC   '\x1b'
  30. #define CR    '\x0d'
  31. #define BS    '\x08'
  32. #define BEL   '\x07'
  33. #define INS   'R'
  34. #define HOME  'G'
  35. #define AEND  'O'
  36. #define CTRLEND 'u'
  37. #define PGUP  'I'
  38. #define PGDN  'Q'
  39. #define DEL   'S'
  40. #define F1    ';'
  41. #define F2    '<'
  42. #define F3    '='
  43. #define F4    '>'
  44. #define F5    '?'
  45. #define F6    '@'
  46. #define F7    'A'
  47. #define F8    'B'
  48. #define F9    'C'
  49. #define F10   'D'
  50. #define CTLEFT  's'
  51. #define CTRIGNT 't'
  52. #define CTLPGUP 'ä'
  53. #define CTLPGDN 'v'
  54. #define CTLF1   '^'
  55. #define CTLF9   'f'
  56. #define ATTC    '.'
  57. #define ALTP    ''
  58. #define ALTW    ''
  59. #define ALTS    ''
  60.  
  61. #define HIGHRES        6
  62. #define TEXTMODE       3
  63. #define BLACK          0x00
  64. #define BLUE           0x01
  65. #define GREEN          0x02
  66. #define CYAN           0x03
  67. #define RED            0x04
  68. #define MAGENTA        0x05
  69. #define BROWN          0x06
  70. #define LIGHTGREY      0x07
  71. #define DARKGREY       0x08
  72. #define LIGHTBLUE      0x09
  73. #define LIGHTGREEN     0x0A
  74. #define LIGHTCYAN      0x0B
  75. #define LIGHTRED       0x0C
  76. #define LIGHTMAGENTA   0x0D
  77. #define YELLOW         0x0E
  78. #define WHITE          0x0F
  79.  
  80. #define INT_10        0x10   /* Function call to the BIOS console driver */
  81. #define MOUSE         0x33   /* microsoft mouse interface */
  82.  
  83. #define NORMAL        0
  84. #define XOR_MODE      1
  85. #define SCREENADDR    0xb8000000         /* IBM SPECIFIC SCREEN BUFFER */
  86. #define BYTE          unsigned char
  87.  
  88. typedef unsigned char far * T_SCREEN;      /* --> 16K SCREEN BUFFER */
  89.  
  90.